package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.property.PropertyAdminInfoDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyOperateConditionDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyProjectGetCommunityInfoDTO;
import com.itlong.cloud.POJO.PO.PropertyUserInfoPO;
import com.itlong.cloud.POJO.VO.property.PropertyOperateConditionVO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectCommunityInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *  小区信息服务接口协议提供对象.
 * </desc>
 *
 * @createDate 2017-10-10
 */
@FeignClient(name = "project-service")
public interface IPropertyCommunityInfoServiceClient {

    /**
     * <desc>
     *      查询小区信息及相关统计信息
     * <desc/>
     * @param  propertyProjectGetCommunityInfoDTO 查询小区信息数据传输对象
     * @return 小区相关信息返回对象
     * @author ZiXuan
     * @createDate 2017-10-11
     */
    @RequestMapping(path = "property/communityInfo/getCommunityInfo",method = {RequestMethod.POST})
    PropertyProjectCommunityInfoVO getCommunityInfo(
            @RequestBody PropertyProjectGetCommunityInfoDTO propertyProjectGetCommunityInfoDTO) throws Exception;

    /**
     * <desc>
     *      修改小区信息
     * </desc>
     *
     * @param paramDTO 修改小区信息数据传输对象
     * @return  受影响的行数
     * @author ZiXuan
     * @createDate 2017-10-23
     */
    @RequestMapping(path = "property/communityInfo/updateCommunityInfo",method = {RequestMethod.POST})
    Integer updateCommunityInfo(@RequestBody PropertyProjectGetCommunityInfoDTO paramDTO) throws Exception;

    /**
     * <desc>
     *      查询物业运营情况
     * </desc>
     *
     * @param propertyOperateConditionDTO 物业运营情况DTO
     * @return 物业运营情况
     * @author wangzhi
     * @createDate 2019/05/24
     */
    @RequestMapping(path = "property/communityInfo/getOperateCondition",method = {RequestMethod.POST})
    PropertyOperateConditionVO getOperateCondition(@RequestBody PropertyOperateConditionDTO propertyOperateConditionDTO) throws Exception;

    /**
     * <desc>
     *      获取物业账号信息
     * </desc>
     *
     * @param userId 用户id
     * @return 物业账号信息
     * @author wangzhi
     * @createDate 2019/08/08
     */
    @RequestMapping(path = "property/communityInfo/getPropertyUserInfoByUserId", method = {RequestMethod.POST})
    PropertyUserInfoPO getPropertyUserInfoByUserId(@RequestParam("userId") String userId) throws Exception;

    /**
     * <desc>
     *      修改物业账号信息
     * </desc>
     *
     * @param propertyAdminInfoDTO 物业管理员信息DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2019/08/08
     */
    @RequestMapping(path = "property/communityInfo/update", method = {RequestMethod.POST})
    Integer update(@RequestBody PropertyAdminInfoDTO propertyAdminInfoDTO) throws Exception;

    /**
     * <desc>
     *      获取通行占比数据
     * </desc>
     *
     * @return 通行占比数据
     * @author wangzhi
     * @createDate 2019/10/16
     */
    @RequestMapping(path = "property/communityInfo/getPassPercent", method = {RequestMethod.POST})
    List<Map<String,Object>> getPassPercent(@RequestBody PropertyProjectGetCommunityInfoDTO propertyProjectGetCommunityInfoDTO) throws Exception;

    /**
     * <desc>
     *     保存收费间隔时间
     * <desc/>
     *
     * @param  projectId  项目编号
     * @param  intervalTime  间隔时间
     * @param  type  类型 1保存 2获取
     * @param  warningTimes  预警次数
     * @return  MessageVO 标准格式化响应结果
     * @author JuGuang.S
     * @createDate 2020/07/15
     */
    @RequestMapping(path = "property/communityInfo/saveFeeIntervalTime", method = {RequestMethod.POST})
    Map<String,Object> saveFeeIntervalTime(@RequestParam("projectId") String projectId,
                               @RequestParam("intervalTime") String intervalTime,
                               @RequestParam("type") Integer type,
                               @RequestParam(value = "warningTimes",required = false)  Integer warningTimes) throws Exception;
}
